home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wtek0693.zip / OOPALLEY.ZIP / XARRAY.CPP < prev    next >
C/C++ Source or Header  |  1993-04-27  |  603b  |  28 lines

  1. // Test class arrayob
  2.  
  3. #include "point.h"
  4. #include "rect.h"
  5. #include "arrayob.h"
  6.  
  7. main()
  8. {
  9.     cout << "\nTest class ArrayOb\n";
  10.     Point A(1,2);
  11.     Point B(3,4); 
  12.     Rectangle a(0,0,10,10);
  13.     Rectangle b(1,2,1,2);
  14.     ArrayOb v(10);
  15.     ArrayOb t(2),u(2);
  16.     v[0] = &a;
  17.     v[1] = &A;
  18.     v[2] = new Point(0,1);
  19.     cout << v << "\n";
  20.     t[0] = &a; t[1] = &A;
  21.     u = t;
  22.     cout << "t = " << t << "\n";
  23.     cout << "t == u: " << (t==u) << "\n";
  24.     cout << "t isEqual u: " << t.isEqual(u) << "\n";
  25.     cout << "t isEqual v: " << t.isEqual(v) << "\n";
  26.     return 0;
  27. }
  28.